const Sequelize = require('sequelize');

module.exports = function(sequelize, Sequelize) {
    return sequelize.define('historyRecord',{
        sendID: {
            type: Sequelize.INTEGER(12),
            allowNull: false,
            comment: "发起者ID"
        },
        sendName: {
            type: Sequelize.STRING(256),
            allowNull: false,
            comment: "发起者名字"
        },
        sendLucksID: {
            type: Sequelize.INTEGER(12),
            allowNull: true,
            comment: "发起者的彩头ID"
        },
        sendLucksCount: {
            type: Sequelize.INTEGER(12),
            allowNull: true,
            comment: "发起者的彩头数量"
        },
        recvID: {
            type: Sequelize.INTEGER(12),
            allowNull: false,
            comment: "接受者ID"
        },
        recvName: {
            type: Sequelize.STRING(256),
            allowNull: false,
            comment: "接受者名字"
        },
        recvLucksID: {
            type: Sequelize.INTEGER(12),
            allowNull: true,
            comment: "接受者的彩头ID"
        },
        recvLucksCount: {
            type: Sequelize.INTEGER(12),
            allowNull: true,
            comment: "接受者的彩头数量"
        },
        code: {
            type: Sequelize.INTEGER(8),
            allowNull: true,
            comment: "交易码"
        },
        state: {
            type: Sequelize.BOOLEAN(false),
            allowNull: false,
            comment: "游戏记录的交易状态"
        }
        

    });

};